<template>
  <div class="box">
    <con-title :info="Toptitle"></con-title>
    <div class="con-survey">
      <equipment></equipment>
      <monitor></monitor>
    </div>
    <div class="con-survey base">
      <!-- 济南农业基地 -->
      <jinan :count="jinan"></jinan>
      <!-- 潍坊农业基地 -->
      <jinan :count="Weifang"></jinan>
      <!-- 青岛市农业基地 -->
      <jinan :count="Qingdao"></jinan>
      <!-- 泰安农业基地 -->
      <jinan :count="Taian"></jinan>
      <!-- 菏泽农业基地 -->
      <jinan :count="Heze"></jinan>
      <!-- 威海农业基地 -->
      <jinan :count="Weihai"></jinan>
    </div>
  </div>
</template>

<script>
//引入组件
import Equipment from "../../components/Equipment.vue";
import Monitor from "../../components/Monitor.vue";
import Jinan from "../../components/Jinan.vue";
import ConTitle from "../../components/ConTitle.vue";
//调用后台接口
import { $sensorList } from "@/api/index.js";
export default {
  components: { Equipment, Monitor, Jinan, ConTitle },
  name: "dashdata",
  data() {
    return {
      jinan: "",
      Weifang: "",
      Qingdao: "",
      Taian: "",
      Heze: "",
      Weihai: "",
      Toptitle: {
        type: "",
        text: "设备列表",
        msg: "-监控所有设备状态",
      },
    };
  },
  mounted() {
    $sensorList().then((res) => {
      this.jinan = res.data.data.济南农业基地;
      this.Weifang = res.data.data.潍坊农业基地;
      this.Qingdao = res.data.data.青岛市农业基地;
      this.Taian = res.data.data.泰安农业基地;
      this.Heze = res.data.data.菏泽农业基地;
      this.Weihai = res.data.data.威海农业基地;
    });
  },
};
</script>

<style scoped lang="scss">
.box {
  display: flex;
  justify-content: space-around;
  flex-direction: column;
  padding: 10px 10px;
}
.con {
  width: 100%;
  height: 50px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  line-height: 50px;
  .con-tlt {
    margin-left: 10px;
    span:nth-child(1) {
      font-size: 14px;
      font-weight: 700;
    }
    span:nth-child(2) {
      padding-left: 5px;
      font-size: 13px;
    }
  }
}
.base {
  flex-direction: column;
  .Weifang {
    margin-top: 10px;
    justify-content: space-around;
    .jian {
      flex-wrap: wrap;
    }
  }
}
.con-survey {
  margin-top: 10px;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  .jian {
    height: 100%;
    .jinan {
      display: flex;
      justify-content: space-between;
      flex-direction: column;
      align-items: center;
      border: 1px solid #ccc;
      margin: 10px;
      .devvalue {
        font-weight: 700;
        font-size: 16px;
      }
      .devnmae {
        font-weight: 550;
        font-size: 13px;
        padding: 5px 0;
      }
      .eui {
        width: 100%;
        background: rgb(243, 244, 245);
        font-size: 13px;
        padding: 5px 0;
        text-align: center;
      }
    }
  }
}
.con-classification {
  margin-top: 10px;
  height: 500px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  .fication {
    width: 49.4%;
    height: 240px;
    background: #fff;
    border-radius: 10px;
  }
}
.text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  .item_txt {
    display: flex;
    justify-content: center;
    width: 13%;
    .myfont {
      font-size: 50px;
      color: #91a8bf;
    }
    img {
      width: 50px;
    }
    .item_box {
      font-size: 12px !important;
      color: #000;
      .lorawan {
        font-size: 20px !important;
        font-weight: 600;
      }
      .lorawan_s {
        font-weight: 600;
        color: #333;
      }
    }
  }
}

.item {
  margin-bottom: 18px;
}

.clearfix {
  font-size: 13px;
  font-weight: bold;
  .myline {
    font-weight: 100;
    color: silver;
    margin-left: 3px;
  }
}
.clearfix:after {
  clear: both;
}
.box-card {
  width: 68%;
}
ul,
li {
  list-style: none;
}
.box-card1 {
  width: 30%;
  .monitor {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
  }
  .monitor li {
    display: flex;
    justify-content: space-between;
    height: 30px;
  }
  .monitor li span:nth-of-type(1) {
    font-size: 13px;
    font-weight: 600;
  }
  .monitor li span:nth-of-type(2) {
    width: 40px;
    height: 20px;
    line-height: 20px;
    font-weight: 600;
    background: #ddf0e0;
    color: #8dab78;
    border-radius: 10px;
    text-align: center;
  }
  .monitor li:nth-of-type(3) span:nth-of-type(2) {
    background: #fbdadb;
    color: #ec5768;
  }
}
</style>